<?php
class Login_model extends CI_Model {

    public function __construct()
    {
        $this->load->database();
    }

    public function check_acc($username, $password)
    {

        $this->db->select ('*');
        $this->db->from   ('user_accounts');
        $this->db->where  ('user_id', $username);
        $this->db->where  ('password', $password);

        $query = $this->db->get();

        if($query->num_rows() == 1)
            return $query->result();
        else
            return false;

    }

}